|
|
|
|
|
|
|
Private Sub LoadVolumeInfo()
Dim res&
Dim VolumeName As String
Dim FileSystem As String
Dim SerialNumber As Long
Dim ComponentLength As Long
Dim FileSystemFlags As Long
VolumeName = String$(256, Chr$(0))
FileSystem = String$(256, Chr$(0))
res = GetVolumeInformation(Left$(Drivel.Drive, 2) & "\", _
VolumeName, 0, SerialNumber, ComponentLength, _
FileSystemFlags, FileSystem, 0)
If res = 0 Then
MsgBox "GetVolumeInformation Error: " & _
GetErrorString(Err.LastDllError)
Exit Sub
End If
List1.Clear
List1.AddItem "Drive " & Drivel.Drive
List1.AddItem "Name: " & VolumeName
List1.AddItem "Component Length: " & ComponentLength
List1.AddItem "Serial #: " & SerialNumber
List1.AddItem "FileSystem: " & FileSystem
End Sub
Private Sub Drive1_Change()
LoadVolumeInfo
End Sub
Private Sub Form Load()
LoadVolumeInfo
End Sub |
|
|
|
|
|
|
|
|
The information provided about the function in this puzzle is sparse. You can look up the function in the Win32 SDK documentation (or in my book Dan Appleman's Visual Basic Programmer's Guide to the Win32 API), but the fact is, you already have enough information in the declaration itself to figure out how to correct the errors. |
|
|
|
|
|